#include <malloc.h>
#include "environment.h"

EVENT* Event_Create(int CN, int P_Period)
{
	EVENT* ev;
	ev = (EVENT*)malloc(sizeof(EVENT));
	ev->DstID = 0;
	ev->energy = 0;
	ev->PacketID = CN*1000+P_Period;
	ev->Seed_checkpoint = CHK_Prob;
	ev->SrcID = CN;
	return ev;
}

void Event_Release(EVENT* ev)
{
	free(ev);
}